package com.panghl.listener;

import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * @Author panghl
 * @Date 2021/6/19 11:14
 * @Description 应用启动做一个一次性事情 : 通常有一些预先数据的加载
 **/
@Order(2)
@Component
public class MyCommandLineRunner implements CommandLineRunner {
    @Override
    public void run(String... args) throws Exception {
        System.out.println("MyCommandLineRunner args  >>>>>>>>>>>>>>>服务启动执行，执行加载数据等操作 ");
    }
}
